package org.example.mapper;


import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.example.bean.Ship;

import java.util.List;

public interface ShipDao {
    public List<Ship>list();
    @Delete("DELETE FROM `ship`WHERE id =#{id}")
    public Void del(int id);
    @Insert("INSERT INTO ship(name,uname,tel,mail,text)VALUES(#{name},#{uname},#{tel},#{mail},#{text})")
    public void add(Ship ship);
    @Update("UPDATE ship SET `name`=#{name},uname=#{uname},tel=#{tel},mail=#{mail},text=#{text} WHERE id=#{id}")
    public void update(Ship ship);
}
